#region Header Licence
//  NKnobMan, Copyright 2009, Alexandre MUTEL.
// 
//  This is free software; you can redistribute it and/or modify it
//  under the terms of the GNU Lesser General Public License as
//  published by the Free Software Foundation; either version 2.1 of
//  the License, or (at your option) any later version.
// 
//  This software is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//  Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public
//  License along with this software; if not, write to the Free
//  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
//  02110-1301 USA, or see the FSF site: http://www.fsf.org.
#endregion
using System;
using System.Runtime.Serialization;

namespace NKnobMan.Templatizer
{
    public enum LayerEnum
    {
        All,
        Layer1, Layer2, Layer3, Layer4, Layer5, Layer6, Layer7, Layer8, Layer9, Layer10,
        Layer11, Layer12, Layer13, Layer14, Layer15, Layer16, Layer17, Layer18, Layer19, Layer20,
        Layer21, Layer22, Layer23, Layer24, Layer25, Layer26, Layer27, Layer28, Layer29, Layer30,
        Layer31, Layer32, Layer33, Layer34, Layer35, Layer36, Layer37, Layer38, Layer39, Layer40,
        Layer41, Layer42, Layer43, Layer44, Layer45, Layer46, Layer47, Layer48, Layer49, Layer50,
        Layer51, Layer52, Layer53, Layer54, Layer55, Layer56, Layer57, Layer58, Layer59, Layer60
    }


    [DataContract]
    public class TemplateOperation
    {
        public TemplateOperation()
        {
            Layer = LayerEnum.All;
            Operation = NKnobMan.Layer.GetKnobManCommands()[0];
            Value = null;
        }

        public LayerEnum Layer
        {
            get; set;
        }

        [DataMember(Name="Layer")]
        string LayerId
        {
            get { return "" + Layer; }
            set { Layer = (LayerEnum)Enum.Parse(typeof (LayerEnum), value);}
        }

        [DataMember]
        public string Operation
        {
            get; set;
        }

        [DataMember]
        public object Value
        {
            get; set;
        }
        
    }
}